// 课程类：关联授课教师
public class Course {
    private String courseId;     // 课程编号
    private String courseName;   // 课程名称
    private String location;     // 上课地点
    private String time;         // 上课时间
    private Teacher teacher;     // 授课教师（关联Teacher对象）

    // 含参构造：初始化课程属性与关联教师
    public Course(String courseId, String courseName, String location, String time, Teacher teacher) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
        this.teacher = teacher;
    }

    // Getter方法（public：允许跨包访问，如test包的Main类）
    public String getCourseId() {
        return courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public String getLocation() {
        return location;
    }

    public String getTime() {
        return time;
    }

    public Teacher getTeacher() {
        return teacher;
    }
}